package com.strato.base.aop.v1_0_0.advice;

import java.lang.reflect.Method;

import com.strato.base.aop.v1_0_0.Invocation;

public class AdvicedInvocation implements Invocation {

	private Invocation invocation;
	private Advice advice;

	public AdvicedInvocation(Invocation invocation, Advice advice) {
		this.invocation=invocation;
		this.advice=advice;
	}

	@Override
	public Object proceed() throws Throwable {
		return advice.proceed(invocation);
	}

	@Override
	public Object getObject() {
		return invocation.getObject();
	}

	@Override
	public Method getMethod() {
		return invocation.getMethod();
	}

	@Override
	public Object[] getArgs() {
		return invocation.getArgs();
	}

}
